#include "yesnodialog.h"
#include "ui_yesnodialog.h"
#include <QComboBox>

YesNoDialog::YesNoDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::YesNoDialog)
{
    ui->setupUi(this);
    timer.start(1000);

    connect(&timer, &QTimer::timeout, this, &YesNoDialog::timeoutProgress);
}

YesNoDialog::~YesNoDialog()
{
    delete ui;
}

int YesNoDialog::getClickNumber()
{
    return this->clickNumber;
}

int YesNoDialog::getDialogShowTime()
{
    return this->dialogShowTime;
}

void YesNoDialog::timeoutProgress()
{
    dialogShowTime++;
    ui->label_2->setText(QString::number(dialogShowTime));
}

void YesNoDialog::on_openButton_clicked()
{
    clickNumber = 1;
    close();
}

void YesNoDialog::on_closeButton_clicked()
{
    clickNumber = 2;
    close();
}
